import { http } from '../../http'
import type { GetUploadSignatureParam, UserInformDto } from '@/service/api/modules/system/param'
import type { EtwUserInformType, OSSTokenVo } from './response'
import type { Feedback } from './param'

// 获取目录上传签名
const getUploadSignature = (params: GetUploadSignatureParam) => http.get<GetUploadSignatureParam, OSSTokenVo>('/oss/token', params)

//获取socket连接凭证
const getSocketToken = () => http.get<void, string>('/socket/connection')

// 获取系统公告
const getPublicNotify = () => http.get<void, string>('/system/properties/public/notify')

// 发送用户反馈
const sendFeedback = (params: Feedback) => http.post<Feedback, void>('/feedback/', params)

// 提交举报信息
const submitReport = (params: UserInformDto) => http.post<UserInformDto, void>('/inform', params)

// 获取举报类型
const getReportTypes = () => http.get<void, EtwUserInformType[]>('/inform/type')

// 获取拼团横幅图
const getGrouponBannerImage = () => http.get<void, string>('/system/properties/activity/banner')

// 获取拼团分享图
const getGrouponShareImage = () => http.get<void, string>('/system/properties/scheduler/team/activity')

// 获取轮播图
const getCarousel = () => http.get<void, string>('/upload/carousel')

//获取资讯数据
const getInquiriesinfo = (params: any) => http.get<void, string>('/inquiries/inquiriesinfo', params)

//获取医院信息数据
const getHospitalinfo = () => http.get<void, string>('/inquiries/hospitalinfo')

export default {
  getUploadSignature,
  getSocketToken,
  getPublicNotify,
  sendFeedback,
  submitReport,
  getReportTypes,
  getGrouponBannerImage,
  getGrouponShareImage,
  getCarousel,
  getInquiriesinfo,
  getHospitalinfo
}
